﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Honestysoft.BaseObject;
using Honestysoft.Financing.Model;

namespace Honestysoft.Financing.WebUI.Module.Audit
{
    /// <summary>
    /// DeleteInvoice 的摘要说明
    /// </summary>
    public class DeleteInvoice : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string id = context.Request.Params["ID"];
            string no = context.Request.Params["InvoiceNo"];
            string code = context.Request.Params["InvoiceCode"];
            QueryParameters query = new QueryParameters();
            query.Add("TableID", id, QueryParameters.OperatorType.Equal);
            query.Add("InvoiceNo", no, QueryParameters.OperatorType.Equal);
            query.Add("InvoiceCode", code, QueryParameters.OperatorType.Equal);
            new BaseBusinessLogic<Bu_AuditTable_Invoice>().DeleteByWhere(query);
            context.Response.Write("0");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}